<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head >
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title></title>
    <link rel="stylesheet" th:href="@{/mobile/css/common.css}"/>
    <link rel="stylesheet" th:href="@{/mobile/css/login.css}"/>
    <link rel="stylesheet" th:href="@{/mobile/layui/css/layui.css}"/>
</head>
<body>
    <div id="login"></div>
    <div class="login_bg">
        <div id="logo">
            <img th:src="@{/mobile/images/logo.png}" alt=""/>
        </div>
        <form id="loginForm" style="margin: 0 auto">
            <div class="userName">
                <lable>手机号码：</lable>
                <input type="text" name="lAccount" placeholder="请输入手机号码" pattern="[0-9]{11}" required/>
            </div>
            <div class="passWord">
                <lable>密&nbsp;&nbsp;&nbsp;码：</lable>
                <input type="password" name="lPassword" placeholder="请输入密码" pattern="[0-9A-Za-z]{6,25}" required/>
            </div>
            <div class="choose_box">
                <div>
                    <input type="checkbox" checked="checked" name="checkbox"/>
                    <lable>记住密码</lable>
                </div>
                <a href="npwd.html">忘记密码</a>
            </div>
        </form>
        <button class="login_btn" onclick="login()" style="
    width: 285px;
    margin: 0 auto;
">登&nbsp;&nbsp;录</button>
        <div class="other_login">
            <div class="other"></div>
            <span>其他方式登录</span>
            <div class="other"></div>
        </div>
        <div class="other_choose">
            <a href="">
                <img th:src="@{/mobile/images/qq.png}" alt=""/>
            </a>
            <a href="">
                <img th:src="@{/mobile/images/wx.png}" alt=""/>
            </a>
            <a href="">
                <img th:src="@{/mobile/images/wb.png}" alt=""/>
            </a>
        </div>
    </div>
    <script th:src="@{/mobile/js/jquery.min.js}"></script>
    <script th:src="@{/mobile/layui/layui.js}"></script>
    <script th:inline="javascript">
        var url = [[@{/}]];
            layui.use("layer", function () {
                var layer = layui.layer;
            });
    </script>
    <script>
        function login() {
            var param = $("#loginForm").serialize();
            $.post(url+"user/login",param,function (result) {
                if (result.code == 200&&result.msg =="4") {
                    window.location.href = "carIndex";
                }
                if (result.code == 200&&result.msg =="3") {
                    window.location.href = "lessorindex";
                }
            })
        }
    </script>
</body>
</html>